<template>
  <div class="width100 backgroundWhite">
    <navs :title="detail.name" fixed></navs>
    <video
      class="video_class"
      controls="controls"
      :src="detail.video_url"
    ></video>
    <div class="m16">
      <div class="ft28">资源简介:</div>
      <div class="ft24 mt8">{{ detail.intro }}</div>
    </div>
  </div>
</template>

<script setup>
import { useRoute } from 'vue-router'
import { ref, reactive, getCurrentInstance, onBeforeMount } from 'vue'

const route = useRoute()
const instance = getCurrentInstance()
const _this = instance.appContext.config.globalProperties
let detail = ref({})
onBeforeMount(async () => {
  let res = await _this.$api.resource.getResourceInfo(route.params.id)
  detail.value = res.data
})
</script>

<style scoped lang="scss">
.video_class {
  width: 100%;
  height: 4.666667rem;
  background-color: white;
}
.img_box {
  width: 2.666667rem;
  height: 2.666667rem;
  img {
    width: 100%;
    height: 100%;
  }
}
</style>
